﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;

public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        loadValuarContent();
    }
    protected void loadValuarContent()
    {
        string id = "4";
        string query = "SELECT * FROM mwc_content WHERE id = " + id;
        SqlConnection sc = new SqlConnection(ConfigurationSettings.AppSettings["mwc_con"]);
        sc.Open();
        SqlCommand scmd = new SqlCommand(query, sc);
        SqlDataReader sdr = scmd.ExecuteReader();
        while (sdr.Read())
        {
            valuar_title.Text = sdr["title"].ToString();
            valuar_fulltext.Text = sdr["fulltext"].ToString();
        }
    }
}
